package org.example.platerecognize.base;

/**
 * @author Zhou
 * @date 14:36 2024/7/16
 */
public enum ColorEnum {
    BLACK("黑色"),
    BLUE("蓝色"),
    GREEN("绿色"),
    WHITE("白色"),
    YELLOW("黄色"),
    UNKNOWN("")
    ;

    private String text;

    ColorEnum(String text) {
        this.text = text;
    }

    public static ColorEnum of(String text){
        for (var item : values()){
            if(item.text.equals(text)){
                return item;
            }
        }

        return UNKNOWN;
    }
}
